var CalendarPlanDetailView = function(c) {
	this.planId = c;
	var b = new Ext.Panel({
		autoHeight : true,
		autoWidth : true,
		border : false,
		autoLoad : {
			url : __ctxPath + "/pages/task/calendarplandetail.jsp?planId=" + c
		}
	});
	var a = new Ext.Window({
		title : "任务信息",
		iconCls : "menu-cal-plan",
		id : "CalendarPlanDetailView",
		width : 560,
		height : 350,
		modal : true,
		autoScroll : true,
		layout : "form",
		buttonAlign : "center",
		items : [b],
		buttons : [{
					text : "关闭",
					iconCls : "btn-cancel",
					handler : function() {
						a.close();
					}
				}]
	});
	$request({
		url : __ctxPath + "/task/getCalendarPlan.do?planId=" + c,
		method : "post",
		success : function(g, e) {
			var d = Ext.util.JSON.decode(g.responseText);
			var f = d.data;
			if (f.status == "0") {
				a.addButton(new Ext.Button({
					text : "完成任务",
					iconCls : "btn-save",
					handler : function() {
						new CalendarPlanFinishForm(c);
					}
				}));
				a.doLayout();
			}
			a.show();
		},
		failure : function(d, e) {
			a.show();
		}
	});
};